1
00:00:00,390 --> 00:00:01,050
Welcome back.

2
00:00:01,890 --> 00:00:09,210
I will discuss with you the algorithm for rotation now before we can just go and watch these two videos

3
00:00:09,540 --> 00:00:12,470
on Python device operations in YouTube.

4
00:00:12,840 --> 00:00:15,630
And also we saw a number in YouTube.

5
00:00:16,290 --> 00:00:21,660
So I'll tell you what, to us, having understood them, then you come back and you'll be able to understand

6
00:00:21,660 --> 00:00:23,550
better the algorithm.

7
00:00:25,200 --> 00:00:29,840
The permutation actually is a combination, that transformation is a permutation.

8
00:00:30,810 --> 00:00:37,780
So here we have a main function which will run this function, run here and the function run here.

9
00:00:38,010 --> 00:00:46,980
This part is just to test the function either for Farenheit is the that is a function that will iterate

10
00:00:47,910 --> 00:00:53,700
drew every bits in the string and do some kind of permutation.

11
00:00:54,840 --> 00:01:02,700
So here is after permutation, you're supposed to get this and before permutation, what is Denisova

12
00:01:02,700 --> 00:01:03,210
after?

13
00:01:04,110 --> 00:01:05,700
So here we are creating a list.

14
00:01:07,320 --> 00:01:16,800
By taking the after permutation list and for every bit I've been one to five beat, which gives you

15
00:01:16,800 --> 00:01:24,180
32 in number, then you create a new list called Before Permutation, then you print out the result.

16
00:01:25,380 --> 00:01:33,270
So the important part is, despite the Raufi, I call it Raufi for rotation, my first barometer is

17
00:01:33,270 --> 00:01:37,430
the argument to the function, and the second one is how many bits you and with.

18
00:01:38,760 --> 00:01:44,520
Now, if you watched the video, which I just showed you just now, the two YouTube video, you understand

19
00:01:44,520 --> 00:01:51,930
that in order to implement a rotation algorithm, you need to have two of this operation may shift.

20
00:01:52,320 --> 00:01:52,740
Right.

21
00:01:53,310 --> 00:02:01,620
And all the shift left five minutes I because the number of bits that we are limiting it to is five

22
00:02:02,220 --> 00:02:04,470
and inspire the to find this.

23
00:02:04,770 --> 00:02:06,030
That's why you're doing enu.

24
00:02:07,620 --> 00:02:14,910
So for we use this information to go through every one of the numbers in here, eight, nine, three,

25
00:02:14,910 --> 00:02:17,700
four and so on, and do the rotation.

26
00:02:18,680 --> 00:02:21,890
So that is what this is doing.

27
00:02:24,660 --> 00:02:35,490
And then here is where you perform the iteration for four days on ice, plus zero fighting ending with

28
00:02:35,730 --> 00:02:37,560
one is coming from here.

29
00:02:40,300 --> 00:02:48,830
So we're just implementing this in Python over here and here is if you do the rotation and everything

30
00:02:48,970 --> 00:02:49,310
is up.

31
00:02:49,840 --> 00:02:52,150
So now here we are going to bring up.

32
00:02:52,510 --> 00:02:53,350
So this one is.

33
00:02:53,360 --> 00:02:55,770
No, we are copying it from here.

34
00:03:00,250 --> 00:03:03,830
You're copping here because this is what he's comparing to.

35
00:03:04,240 --> 00:03:06,420
So this is the end of the permutation.

36
00:03:06,900 --> 00:03:12,250
We are not doing a reverse permutation, define what number to enter, who caused it to end up like

37
00:03:12,250 --> 00:03:12,610
this.

38
00:03:13,590 --> 00:03:19,840
After you go through the permutation transformation, you're right.

39
00:03:20,160 --> 00:03:26,270
So we are doing it in reverse and that's how it's how we write this Python script.

40
00:03:27,000 --> 00:03:31,860
And then now we are going to run by the script and see what the guy says.

41
00:03:32,470 --> 00:03:38,640
So I'm going to say this and then we are going to be writing three.

42
00:03:39,720 --> 00:03:43,350
So, boy, and you're going to get a result.

43
00:03:44,130 --> 00:03:46,310
So this is the password, right?

44
00:03:46,410 --> 00:03:53,400
So what he has done is he has taken this this number and reversed it to get this.

45
00:03:53,610 --> 00:03:55,380
I mean, this is why you supposin put.

46
00:03:56,540 --> 00:04:05,600
So when he put this issue, he would go through the process of transforming to become this No.

47
00:04:06,460 --> 00:04:12,870
All right, so the pythons clearly just to reverse the transformation algorithm, which is in sight

48
00:04:13,770 --> 00:04:17,160
here and here, they are reversing this.

49
00:04:17,400 --> 00:04:19,430
So we are doing OK.

50
00:04:19,440 --> 00:04:21,000
So now here you can copy.

51
00:04:21,000 --> 00:04:21,480
These are.

52
00:04:23,290 --> 00:04:32,830
Computers are we have to generate the key using x1 x2 sorry, we base our password here.

53
00:04:34,950 --> 00:04:38,880
Presenter And we are looking key.

54
00:04:39,830 --> 00:04:43,850
So we copy Key and you're unhappy to.

55
00:04:48,710 --> 00:04:53,030
And now we are seeing our queen here a bit of heat enter.

56
00:04:56,100 --> 00:05:01,490
If you a tree now you find a low level tree, there's a new hole in it.

57
00:05:02,520 --> 00:05:14,480
So now you're going to copy the out into a tree, likely go to the Panditji NPC here and you enter this.

58
00:05:15,030 --> 00:05:16,900
Now you have like a tree waiting for you.

59
00:05:17,430 --> 00:05:26,880
It is not really necessary for you to understand every single bit of the input of the operation is quite

60
00:05:26,880 --> 00:05:28,260
advanced, actually, the algorithm.

61
00:05:29,010 --> 00:05:37,560
The important thing to take away from all this is that knowing how to combine all the comments here

62
00:05:37,560 --> 00:05:47,070
like this and also knowing how to rename labels and other important, useful thing to notice if you

63
00:05:47,070 --> 00:05:51,660
enter if you're into F.J..

64
00:05:53,660 --> 00:06:00,720
And you enter in the transform here, you will notice some new concept is found here.

65
00:06:01,310 --> 00:06:05,910
So whenever you see Cardsharp, as are 14 here, this is the indication.

66
00:06:05,910 --> 00:06:06,800
This is a very.

67
00:06:07,740 --> 00:06:12,650
Auto industry 14 is offsetting every all right.

68
00:06:12,720 --> 00:06:18,150
So A14 is your connector for the aluminum nery.

69
00:06:19,020 --> 00:06:20,840
The same thing is happening here.

70
00:06:21,240 --> 00:06:24,390
This upholstering is actually your G buffer.

71
00:06:25,110 --> 00:06:28,980
So you do before we show your earlier injury.

72
00:06:29,460 --> 00:06:35,520
And then here, Artemesia, your first elementary and secondary.

73
00:06:37,490 --> 00:06:39,220
So that is what's happening.

74
00:06:39,250 --> 00:06:44,950
So these are the new digs here, whenever you see this, you can see right there coming here is.

75
00:06:46,450 --> 00:06:48,190
So it is easier for you to understand.

76
00:06:48,940 --> 00:06:54,130
So these are things you should take the take away from this lesson.

77
00:06:54,820 --> 00:07:01,090
Not really to understand the algorithm and how the reverse algorithm, but more importantly, to know

78
00:07:01,180 --> 00:07:07,670
how to put your comments and rename labels so that it's easier to read like this.

79
00:07:08,320 --> 00:07:15,220
Don't worry if you don't understand how the garden is created, how to reverse how we write this Python

80
00:07:15,220 --> 00:07:16,630
script is not important.

81
00:07:17,200 --> 00:07:19,370
So that's all for this video.

82
00:07:19,690 --> 00:07:20,890
I'll see you in the next one.

83
00:07:21,100 --> 00:07:22,090
Thank you for watching.
